﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace CoVanHocTapProject
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801

    public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "chatter", // Route name
                "chat", // URL with parameters
                new { controller = "Chatterbot", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "dkkhht", // Route name
                "khht/dky", // URL with parameters
                new { controller = "KeHoachHocTap", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "ctdtchuan", // Route name
                "ctdt/ctdtchuan", // URL with parameters
                new { controller = "ChuongTrinhDaoTaoChuan", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "lotrinhhoctapchitiet", // Route name
                "ctdt/lotrinhchitiet", // URL with parameters
                new { controller = "ChuongTrinhDaoTaoChuan", action = "LoTrinhHocTapChiTiet", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "lotrinhhoctapchitietUC", // Route name
                "ctdt/lotrinhchitietUC", // URL with parameters
                new { controller = "ChuongTrinhDaoTaoChuan", action = "LoTrinhHocTapChiTietUC", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "DangNhapTC", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "TrangChu", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "DangNhap", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "TrangChu", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "TrangChu", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "TinChiTichLuyBatBuoc",
                "{controller}/{action}/{id}",
                new { controller = "TheoDoiSinhVien", action = "TinChiTichLuyBatBuoc", id = UrlParameter.Optional }
                );


        }

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterRoutes(RouteTable.Routes);
        }
    }
}